{% extends 'base.html' %}

{% block body %}
  <body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">社团管理系统</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
{#            <li><a href="http://v3.bootcss.com/examples/dashboard/#">Dashboard</a></li>#}
{#            <li><a href="http://v3.bootcss.com/examples/dashboard/#">Settings</a></li>#}
{#            <li><a href="http://v3.bootcss.com/examples/dashboard/#">Profile</a></li>#}
{#            <li><a href="http://127.0.0.1:8000/admin/">{{ request.user.userprofile.name }}</a></li>#}
            <li class="dropdown">
              <a href="http://127.0.0.1:8000/admin/" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">{{ request.user.userprofile.name }} <span class="caret"></span></a>
              <ul class="dropdown-menu" role="menu">
                <li><a href="http://127.0.0.1:8000/admin/">后台管理</a></li>
                <li><a href="http://127.0.0.1:8000/admin/password_change/">修改密码</a></li>
                <li><a href="{% url 'acc_logout' %}">注销</a></li>
              </ul>
            </li>
          </ul>
{#            查找#}
{#          <form class="navbar-form navbar-right">#}
{#            <input type="text" class="form-control" placeholder="Search...">#}
{#          </form>#}
        </div>
      </div>
    </nav>

    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
          <ul class="nav nav-sidebar">
           {% for  role in request.user.userprofile.roles.all %}
             {% for menu in role.menus.all %}
               <li class=""><a href="{% if menu.url_type == 0 %}{%  url  menu.url_name %} {% else %}{{ menu.url_name }}{% endif %}">{{ menu.name }}</a></li>
             {% endfor %}
           {% endfor %}

          </ul>



        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
         {% block page-content %}
          <h1 class="page-header">Dashboard</h1>

          <div class="row placeholders">
            <div class="col-xs-6 col-sm-3 placeholder">
              <img src="" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
              <h4>Label</h4>
              <span class="text-muted">Something else</span>
            </div>
            <div class="col-xs-6 col-sm-3 placeholder">
              <img src="" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
              <h4>Label</h4>
              <span class="text-muted">Something else</span>
            </div>
            <div class="col-xs-6 col-sm-3 placeholder">
              <img src="" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
              <h4>Label</h4>
              <span class="text-muted">Something else</span>
            </div>
            <div class="col-xs-6 col-sm-3 placeholder">
              <img src="" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
              <h4>Label</h4>
              <span class="text-muted">Something else</span>
            </div>
          </div>

          <h2 class="sub-header">Section title</h2>
         {% endblock %}
        </div>
      </div>
    </div>

    <!-- Bootstrap core JavaScript
    ================================================== -->
{#    <!-- Placed at the end of the document so the pages load faster -->#}
{#    <script src="./Dashboard Template for Bootstrap_files/jquery.min.js.下载"></script>#}
{#    <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>#}
{#    <script src="./Dashboard Template for Bootstrap_files/bootstrap.min.js.下载"></script>#}
{#    <!-- Just to make our placeholder images work. Don't actually copy the next line! -->#}
{#    <script src="./Dashboard Template for Bootstrap_files/holder.min.js.下载"></script>#}
{#    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->#}
{#    <script src="./Dashboard Template for Bootstrap_files/ie10-viewport-bug-workaround.js.下载"></script>#}


</body>

{% endblock %}